package com.ruicar.afs.cloud.manage.task;

import com.ruicar.afs.cloud.common.job.core.biz.model.ReturnT;
import com.ruicar.afs.cloud.common.job.core.handler.annotation.AfsJob;
import com.ruicar.afs.cloud.common.job.core.handler.annotation.AfsJobHandler;
import com.ruicar.afs.cloud.manage.common.service.ManageRepaymentDateChangeService;
import com.ruicar.afs.cloud.manage.finance.bankarrive.service.ManageAccountRegisterService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.concurrent.ExecutionException;

/**
 * <p>Description: </p>
 *
 * @author ZC.GUO
 * @version 1.0
 * @date create on 2020-07-09 18:25
 */
@Component
@Slf4j
@AllArgsConstructor
@AfsJob
public class ContractBasicTask {

    private final ManageRepaymentDateChangeService manageRepaymentDateChangeService;

    /**
     * 定时发送还款日变更数据
     * @author yaorui.zhang
     * @param
     * @return
     */
    @AfsJobHandler(value = "sendDuedatechange")
    public ReturnT<String> sendDuedatechange(String params) throws ExecutionException, InterruptedException {
        log.info("开始发送还款日变更数据");
        manageRepaymentDateChangeService.sendDuedatechange();
        log.info("结束发送还款日变更数据");
        return ReturnT.SUCCESS;
    }

}
